import Vuex from 'vuex'
import Vue from 'vue'

// import {ADDCOUNTER, ADDTOCART} from './mutation-type'
import mutations from './mutations'
import actions from './actions'

// 安装插件
Vue.use(Vuex)

const state = {
	cartList:[]
}
const store = new Vuex.Store({
	state,
	mutations,
	actions,
	getters:{
		length(state){
			return state.cartList.length
		},
		cartList(state){
			
			return state.cartList
		}
	}
})

export default store